package com.qyer.lxp.model.price.normal;

import com.qyer.lxp.common.framework.adapter.DateAdapter;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * Created by jiangping on 16/5/18.
 */
@XmlRootElement(name = "daily-prices")
@XmlAccessorType(XmlAccessType.FIELD)
public class DailyPrice implements Serializable {
    private static final long serialVersionUID = -1525434060800206283L;

    @XmlJavaTypeAdapter(DateAdapter.class)
    private Date date;

    @XmlElementWrapper(name = "prices")
    @XmlElement(name = "price")
    private List<Price> priceList;

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public List<Price> getPriceList() {
        return priceList;
    }

    public void setPriceList(List<Price> priceList) {
        this.priceList = priceList;
    }

    @Override
    public String toString() {
        return "DailyPrice{" +
                "date=" + date +
                ", priceList=" + priceList +
                '}';
    }
}
